{extend name="public:layout" /}
{block name="title"}字典列表{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li class="active"><i class="fa fa-hand-o-right"></i> 字典管理</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="toolbar">
                <div class="pull-left">
                    <a class="btn btn-primary" href="{:url('DictType/index')}">
                        <i class=""></i>&nbsp;字典分类管理
                    </a>
                    <a class="btn btn-primary" href="{:url('add',['type_id'=>$type_id])}">
                        <i class="fa fa-plus"></i>&nbsp;添加字典
                    </a>
                    <a class="btn btn-primary" href="{:url('updateCache')}">
                        <i class="fa fa-plus"></i>&nbsp;更新字典缓存
                    </a>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="row">
                <div class="col-sm-3">
                    <ul class="nav nav-pills nav-stacked">
                        {volist name="typeList" id="vo"}
                        <li {eq name="vo.type_id" value="$type_id"}class="active"{/eq}>
                        <a href="{:url('index',['type_id'=>$vo['type_id']])}">{$vo.type_name}</a>
                        </li>
                        {/volist}
                    </ul>
                </div>
                <div class="col-sm-9">
                    <table class="table table-bordered" id="grid">
                        <tr>
                            <th>字典标识</th>
                            <th>字典名字</th>
                            <th width="150">操作</th>
                        </tr>
                        {volist name="dictList" id="vo"}
                            <tr>
                                <td>{$vo.dict_id}</td>
                                <td>{$vo.dict_name}</td>
                                <td>
                                    <a href="{:url('edit',['id'=>$vo['id']])}">修改</a>
                                    {eq name="vo.is_fixed" value="0"}
                                        <a href="javascript:;" onclick="doAction(this);" data-params="id={$vo.id}"
                                           data-msg="确认操作吗？" data-url="{:url('del')}">删除</a>
                                    {/eq}
                                </td>
                            </tr>
                        {/volist}
                    </table>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
{/block}
{block name="script"}{/block}